package test.action
{

import com.fit4as.fit.Fixture;
	

public class TestActor extends Fixture
{

	private var _name : String;
	private var _complexObject : ComplexObject;
	
	
	public function TestActor()
	{
		//t race("TestActor");
	}

	public function name(): String
	{
		return _name;
	}
	
	public function throwError() : String
	{
		throw new Error("test error");
		return _name;
	}

	public function setName( name : String ) : void
	{
		this._name = name;
	}
	
	public function clearName() : void
	{
		this._name = "";
	}
	
	public function complexObject() : ComplexObject
	{
		return _complexObject;
	}
	
	public function setComplexObject( pComplexObject : ComplexObject ) : void
	{
		_complexObject = pComplexObject;
	}
	
	/**
	 * We need to add support for ComplexObject to the fixture
	 */ 
	override public function parse( s : String, type : Class) : Object 
    {
    	switch( type )
    	{
    		case ComplexObject : 
    			return new ComplexObject( s );
    	}
    	return super.parse( s, type );
    }	
}
}